package com.baizhi.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;
import java.util.UUID;

public class FileUtil {


    public static String addFile() throws IOException {

       /* System.out.println("进入file工具类");
        String originalFileName = photo.getOriginalFilename();

        String suffix = originalFileName.substring(originalFileName.lastIndexOf("."));

        String realPath = request.getServletContext().getRealPath("/img");
        String uuid = UUID.randomUUID().toString();
        String newPhoto = uuid + suffix;

        photo.transferTo(new File(realPath + "/" +newPhoto));

*/
        return null;

    }
}
